/**
 *
 * File  : Controller.h
 * Time  : 2015-05-21 19:42
 * Author: YangBo
 * Ref   : Null
 */

#ifndef PLCC_CONTROLLER_H_
#define PLCC_CONTROLLER_H_

#include "EventProcess.h"
#include "setting/UserSettings.h"
#include <string>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <fstream>
#include "play/play_data.h"
#include "log/log.h"
using namespace std;
#define NETWORK "/etc/network/interfaces"

struct IPset{
  string address;
  string netmask;
  string network;
  string broadcast;
};

class Controller{
 public:
  Controller(EventQueue<LogType>* log_queue);
  ~Controller();
  int SetProcess(int );
  int PlayProcess();
  int DeleteFile();
  int SetTime(string );
  int SetIP(IPset);
 private:
  int xmldecoder();
  int set_;
  EventProcess *p;
};

#endif //PLCC_CONTROLLER_H_
